Skip to content

test: use test context cleanup hooks in parser issue tests#5282

Merged
mcollina merged 1 commit into
mainfrom
fix/parser-issues-cleanup-hooks
May 18, 2026
Merged

test: use test context cleanup hooks in parser issue tests#5282
mcollina merged 1 commit into
mainfrom
fix/parser-issues-cleanup-hooks

Conversation

@mcollina
Copy link
Copy Markdown
Member

This relates to...

N/A

Rationale

test/parser-issues.js was using bare after() calls even though the file only imports test from node:test. That caused lint failures (no-undef) and made the affected tests fail at runtime with ReferenceError: after is not defined.

Changes

  • capture the original test context before wrapping it with tspl
  • replace bare after() calls with ctx.after(...) in the affected parser issue tests

Features

N/A

Bug Fixes

  • fix cleanup registration in the truncated chunked response parser tests so linting passes and the tests run successfully

Breaking Changes and Deprecations

N/A

Status

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.26%. Comparing base (13f6af6) to head (c89d4d0).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5282   +/-   ##
=======================================
  Coverage   93.26%   93.26%           
=======================================
  Files         110      110           
  Lines       36533    36533           
=======================================
  Hits        34071    34071           
  Misses       2462     2462           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mcollina mcollina requested a review from trivikr May 16, 2026 20:37
@trivikr
Copy link
Copy Markdown
Member

trivikr commented May 16, 2026

Needs rebase, and removal of after from line 4 in main

const { test, after } = require('node:test')

@mcollina mcollina merged commit c159bfb into main May 18, 2026
60 of 61 checks passed
@mcollina mcollina deleted the fix/parser-issues-cleanup-hooks branch May 18, 2026 16:09
@trivikr
Copy link
Copy Markdown
Member

trivikr commented May 20, 2026

Needs rebase, and removal of after from line 4 in main

Merging without rebase caused a lint failure which was fixed in #5316
I'll mark my comments with "Request changes" in future, so that they're not missed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants